@extends('admin.layout.index')

@section('content')
@if (count($errors) > 0)
     <!-- 错误提醒 -->
    <div class="mws-form-message error">
        <ul>
            @foreach ($errors->all() as $error)
                <li>{{ $error }}</li>
            @endforeach
        </ul>
    </div>
@endif
<div class="mws-panel grid_8">
        <div class="mws-panel-header">
            <span>修改信息</span>
        </div>
        <div class="mws-panel-body no-padding">

        <!-- 有上传文件需求，所以要表单属性要加enctype -->

            <form class="mws-form" action="/admin/setting/update" method="post" enctype="multipart/form-data">
            {{ csrf_field() }}
                <div class="mws-form-inline"> 
                    <div class="mws-form-row">
                        <label class="mws-form-label">网站标题</label>
                        <div class="mws-form-item">
                            <input class="large" type="text" name="name" value="{{$data['name']}}">
                        </div>
                    </div>
                    <div class="mws-form-row">
                        <label class="mws-form-label">关键词</label>
                        <div class="mws-form-item">
                            <input class="large" type="text" name="keyword" value="{{$data['keyword']}}">
                        </div>
                    </div>
                    <div class="mws-form-row">
                        <label class="mws-form-label">网站描述</label>
                        <div class="mws-form-item">
                            <input class="large" type="text" name="content" value="{{$data['content']}}">
                        </div>
                    </div>
                    <div class="mws-form-row">
                        <label class="mws-form-label">咨询QQ</label>
                        <div class="mws-form-item">
                            <input class="large" type="text" name="qq" value="{{$data['qq']}}">
                        </div>
                    </div>
                    <div class="mws-form-row">
                        <label class="mws-form-label">咨询热线</label>
                        <div class="mws-form-item">
                            <input class="large" type="text" name="tel" value="{{$data['tel']}}">
                        </div>
                    </div>
                    <div class="mws-form-row">
                        <label class="mws-form-label">版权所有</label>
                        <div class="mws-form-item">
                            <input class="large" type="text" name="pow" value="{{$data['pow']}}">
                        </div>
                    </div>
                    <div class="mws-form-row">
                        <label class="mws-form-label">备案号</label>
                        <div class="mws-form-item">
                            <input class="large" type="text" name="pic" value="{{$data['pic']}}">
                        </div>
                    </div>
                   <div class="mws-form-row">
                        <label class="mws-form-label">网站LOGO:</label>
                        <!-- 隐藏域传原来的图片名称 -->
                         <input type="hidden" name="oldpicture" value="{{$data['picture']}}">
                        <div class="mws-form-item">
                            <input name="picture" class="required" style="position: absolute; top: 0px; right: 0px; margin: 0px; cursor: pointer; font-size: 999px; opacity: 0; z-index: 999;" type="file">
                            <img src="{{$data['picture']}}" alt="" style="width:60px;">
                            <label for="picture" class="error" generated="true" style="display:none"></label>
                            
                        </div>
                        </div>
                    </div>
                    <div class="mws-button-row">
                        <input type="hidden" name="id" value="{{$data['id']}}">
                        <input class="btn btn-danger" type="submit"  value="提交">
                    </div>
                </div>
            </form>
        </div> 
        </div>      
@endsection